function TbJxshIncome(params){ 
	 
}

TbJxshIncome.Where = function(type,proxy){
	this.type = type;
	this.proxy=proxy;
	this.linked = null;
	this.set = null;
	if(this.type==0){
		this.set = new TbJxshIncome.Where(1,true);
		this.set.linked = this;
	}
	this.getProxy = function(){
		var m = new TbJxshIncome.Where(this.type);//当前的对像
		if(this.type==0){
			m.set = new TbJxshIncome.Where(1,true);//set对象
			m.set.linked = m;
		}else{
			m.linked=this.linked;
			this.linked.linked=m;
		}
		return m;
	}
	this.data = {};
	this.put = function(key,value){
		this.data[key] = value;
	}
	this.get = function(key){
		return this.data[key];
	}
	/** 编号 [非空]       **/
	this.tbjiId=function(tbjiId){if(this.proxy)return this.getProxy().tbjiId(tbjiId);  this.put("tbjiId", tbjiId);return this;};
	/** and tbji_id is null */
	this.tbjiIdNull=function(){if(this.proxy)return this.getProxy().tbjiIdNull();if(this.get("tbjiIdNot")==null)this.put("tbjiIdNot", "");this.put("tbjiId", null);return this;};
	/** not .... */
	this.tbjiIdNot=function(){if(this.proxy)return this.getProxy().tbjiIdNot();this.put("tbjiIdNot", "not");return this;};
	this.tbjiIdNotNull=function(){if(this.proxy)return this.getProxy().tbjiIdNotNull();this.put("tbjiIdNot", "not");this.put("tbjiId", null);return this;};
	this.tbjiIdNot=function(tbjiId){if(this.proxy)return this.getProxy().tbjiIdNot(tbjiId);this.put("tbjiIdNot", "not");this.put("tbjiId", tbjiId);return this;};
	/** and tbji_id <= ? */
	this.tbjiIdMin=function(min){if(this.proxy)return this.getProxy().tbjiIdMin(min);this.put("tbjiIdMin", min);return this;};
	/** and tbji_id >= ? */
	this.tbjiIdMax=function(max){if(this.proxy)return this.getProxy().tbjiIdMax(max);this.put("tbjiIdMax", max);return this;};
	this.tbjiIdIn=function(ids){
		if(this.proxy)return this.getProxy().tbjiIdIn(ids);  this.put("tbjiIdIn", ids);return this;
	};	
	
	/** 所属品牌 [非空] [Merchant]      **/
	this.tbjiMerchant=function(tbjiMerchant){if(this.proxy)return this.getProxy().tbjiMerchant(tbjiMerchant);  this.put("tbjiMerchant", tbjiMerchant);return this;};
	/** and tbji_merchant is null */
	this.tbjiMerchantNull=function(){if(this.proxy)return this.getProxy().tbjiMerchantNull();if(this.get("tbjiMerchantNot")==null)this.put("tbjiMerchantNot", "");this.put("tbjiMerchant", null);return this;};
	/** not .... */
	this.tbjiMerchantNot=function(){if(this.proxy)return this.getProxy().tbjiMerchantNot();this.put("tbjiMerchantNot", "not");return this;};
	this.tbjiMerchantNotNull=function(){if(this.proxy)return this.getProxy().tbjiMerchantNotNull();this.put("tbjiMerchantNot", "not");this.put("tbjiMerchant", null);return this;};
	this.tbjiMerchantNot=function(tbjiMerchant){if(this.proxy)return this.getProxy().tbjiMerchantNot(tbjiMerchant);this.put("tbjiMerchantNot", "not");this.put("tbjiMerchant", tbjiMerchant);return this;};
	this.tbjiMerchantIn=function(ids){
		if(this.proxy)return this.getProxy().tbjiMerchantIn(ids);  this.put("tbjiMerchantIn", ids);return this;
	};	
	
	/** 经销商 [非空] [TbJxsh]      **/
	this.tbjiJxsh=function(tbjiJxsh){if(this.proxy)return this.getProxy().tbjiJxsh(tbjiJxsh);  this.put("tbjiJxsh", tbjiJxsh);return this;};
	/** and tbji_jxsh is null */
	this.tbjiJxshNull=function(){if(this.proxy)return this.getProxy().tbjiJxshNull();if(this.get("tbjiJxshNot")==null)this.put("tbjiJxshNot", "");this.put("tbjiJxsh", null);return this;};
	/** not .... */
	this.tbjiJxshNot=function(){if(this.proxy)return this.getProxy().tbjiJxshNot();this.put("tbjiJxshNot", "not");return this;};
	this.tbjiJxshNotNull=function(){if(this.proxy)return this.getProxy().tbjiJxshNotNull();this.put("tbjiJxshNot", "not");this.put("tbjiJxsh", null);return this;};
	this.tbjiJxshNot=function(tbjiJxsh){if(this.proxy)return this.getProxy().tbjiJxshNot(tbjiJxsh);this.put("tbjiJxshNot", "not");this.put("tbjiJxsh", tbjiJxsh);return this;};
	this.tbjiJxshIn=function(ids){
		if(this.proxy)return this.getProxy().tbjiJxshIn(ids);  this.put("tbjiJxshIn", ids);return this;
	};	
	
	/** 经销商名称        **/
	this.tbjiJxsName=function(tbjiJxsName){if(this.proxy)return this.getProxy().tbjiJxsName(tbjiJxsName);  this.put("tbjiJxsName", tbjiJxsName);return this;};
	/** and tbji_jxs_name is null */
	this.tbjiJxsNameNull=function(){if(this.proxy)return this.getProxy().tbjiJxsNameNull();if(this.get("tbjiJxsNameNot")==null)this.put("tbjiJxsNameNot", "");this.put("tbjiJxsName", null);return this;};
	/** not .... */
	this.tbjiJxsNameNot=function(){if(this.proxy)return this.getProxy().tbjiJxsNameNot();this.put("tbjiJxsNameNot", "not");return this;};
	this.tbjiJxsNameNotNull=function(){if(this.proxy)return this.getProxy().tbjiJxsNameNotNull();this.put("tbjiJxsNameNot", "not");this.put("tbjiJxsName", null);return this;};
	this.tbjiJxsNameNot=function(tbjiJxsName){if(this.proxy)return this.getProxy().tbjiJxsNameNot(tbjiJxsName);this.put("tbjiJxsNameNot", "not");this.put("tbjiJxsName", tbjiJxsName);return this;};
	
	/** 订单编号 [非空]       **/
	this.tbjiOrderId=function(tbjiOrderId){if(this.proxy)return this.getProxy().tbjiOrderId(tbjiOrderId);  this.put("tbjiOrderId", tbjiOrderId);return this;};
	/** and tbji_order_id is null */
	this.tbjiOrderIdNull=function(){if(this.proxy)return this.getProxy().tbjiOrderIdNull();if(this.get("tbjiOrderIdNot")==null)this.put("tbjiOrderIdNot", "");this.put("tbjiOrderId", null);return this;};
	/** not .... */
	this.tbjiOrderIdNot=function(){if(this.proxy)return this.getProxy().tbjiOrderIdNot();this.put("tbjiOrderIdNot", "not");return this;};
	this.tbjiOrderIdNotNull=function(){if(this.proxy)return this.getProxy().tbjiOrderIdNotNull();this.put("tbjiOrderIdNot", "not");this.put("tbjiOrderId", null);return this;};
	this.tbjiOrderIdNot=function(tbjiOrderId){if(this.proxy)return this.getProxy().tbjiOrderIdNot(tbjiOrderId);this.put("tbjiOrderIdNot", "not");this.put("tbjiOrderId", tbjiOrderId);return this;};
	/** and tbji_order_id <= ? */
	this.tbjiOrderIdMin=function(min){if(this.proxy)return this.getProxy().tbjiOrderIdMin(min);this.put("tbjiOrderIdMin", min);return this;};
	/** and tbji_order_id >= ? */
	this.tbjiOrderIdMax=function(max){if(this.proxy)return this.getProxy().tbjiOrderIdMax(max);this.put("tbjiOrderIdMax", max);return this;};
	this.tbjiOrderIdIn=function(ids){
		if(this.proxy)return this.getProxy().tbjiOrderIdIn(ids);  this.put("tbjiOrderIdIn", ids);return this;
	};	
	
	/** 订单时间        **/
	this.tbjiOrderTime=function(tbjiOrderTime){if(this.proxy)return this.getProxy().tbjiOrderTime(tbjiOrderTime);  this.put("tbjiOrderTime", tbjiOrderTime);return this;};
	/** and tbji_order_time is null */
	this.tbjiOrderTimeNull=function(){if(this.proxy)return this.getProxy().tbjiOrderTimeNull();if(this.get("tbjiOrderTimeNot")==null)this.put("tbjiOrderTimeNot", "");this.put("tbjiOrderTime", null);return this;};
	/** not .... */
	this.tbjiOrderTimeNot=function(){if(this.proxy)return this.getProxy().tbjiOrderTimeNot();this.put("tbjiOrderTimeNot", "not");return this;};
	this.tbjiOrderTimeNotNull=function(){if(this.proxy)return this.getProxy().tbjiOrderTimeNotNull();this.put("tbjiOrderTimeNot", "not");this.put("tbjiOrderTime", null);return this;};
	this.tbjiOrderTimeNot=function(tbjiOrderTime){if(this.proxy)return this.getProxy().tbjiOrderTimeNot(tbjiOrderTime);this.put("tbjiOrderTimeNot", "not");this.put("tbjiOrderTime", tbjiOrderTime);return this;};
	/** and tbji_order_time >= ? */
	this.tbjiOrderTimeStart=function(start){if(this.proxy)return this.getProxy().tbjiOrderTimeStart(start);this.put("tbjiOrderTimeStart", start);return this;};			
	/** and tbji_order_time <= ? */
	this.tbjiOrderTimeEnd=function(end){if(this.proxy)return this.getProxy().tbjiOrderTimeEnd(end);this.put("tbjiOrderTimeEnd", end);return this;};
	
	/** 下单人        **/
	this.tbjiMember=function(tbjiMember){if(this.proxy)return this.getProxy().tbjiMember(tbjiMember);  this.put("tbjiMember", tbjiMember);return this;};
	/** and tbji_member is null */
	this.tbjiMemberNull=function(){if(this.proxy)return this.getProxy().tbjiMemberNull();if(this.get("tbjiMemberNot")==null)this.put("tbjiMemberNot", "");this.put("tbjiMember", null);return this;};
	/** not .... */
	this.tbjiMemberNot=function(){if(this.proxy)return this.getProxy().tbjiMemberNot();this.put("tbjiMemberNot", "not");return this;};
	this.tbjiMemberNotNull=function(){if(this.proxy)return this.getProxy().tbjiMemberNotNull();this.put("tbjiMemberNot", "not");this.put("tbjiMember", null);return this;};
	this.tbjiMemberNot=function(tbjiMember){if(this.proxy)return this.getProxy().tbjiMemberNot(tbjiMember);this.put("tbjiMemberNot", "not");this.put("tbjiMember", tbjiMember);return this;};
	
	/** 配送商        **/
	this.tbjiDistributor=function(tbjiDistributor){if(this.proxy)return this.getProxy().tbjiDistributor(tbjiDistributor);  this.put("tbjiDistributor", tbjiDistributor);return this;};
	/** and tbji_distributor is null */
	this.tbjiDistributorNull=function(){if(this.proxy)return this.getProxy().tbjiDistributorNull();if(this.get("tbjiDistributorNot")==null)this.put("tbjiDistributorNot", "");this.put("tbjiDistributor", null);return this;};
	/** not .... */
	this.tbjiDistributorNot=function(){if(this.proxy)return this.getProxy().tbjiDistributorNot();this.put("tbjiDistributorNot", "not");return this;};
	this.tbjiDistributorNotNull=function(){if(this.proxy)return this.getProxy().tbjiDistributorNotNull();this.put("tbjiDistributorNot", "not");this.put("tbjiDistributor", null);return this;};
	this.tbjiDistributorNot=function(tbjiDistributor){if(this.proxy)return this.getProxy().tbjiDistributorNot(tbjiDistributor);this.put("tbjiDistributorNot", "not");this.put("tbjiDistributor", tbjiDistributor);return this;};
	
	/** 订单类别    1:直接购买订单 2:余额提货订单     **/
	this.tbjiType=function(tbjiType){if(this.proxy)return this.getProxy().tbjiType(tbjiType);  this.put("tbjiType", tbjiType);return this;};
	/** and tbji_type is null */
	this.tbjiTypeNull=function(){if(this.proxy)return this.getProxy().tbjiTypeNull();if(this.get("tbjiTypeNot")==null)this.put("tbjiTypeNot", "");this.put("tbjiType", null);return this;};
	/** not .... */
	this.tbjiTypeNot=function(){if(this.proxy)return this.getProxy().tbjiTypeNot();this.put("tbjiTypeNot", "not");return this;};
	this.tbjiTypeNotNull=function(){if(this.proxy)return this.getProxy().tbjiTypeNotNull();this.put("tbjiTypeNot", "not");this.put("tbjiType", null);return this;};
	this.tbjiTypeNot=function(tbjiType){if(this.proxy)return this.getProxy().tbjiTypeNot(tbjiType);this.put("tbjiTypeNot", "not");this.put("tbjiType", tbjiType);return this;};
	this.tbjiTypeIn=function(ids){
		if(this.proxy)return this.getProxy().tbjiTypeIn(ids);  this.put("tbjiTypeIn", ids);return this;
	};	
	
	/** 订单明细    query:goodsNumber text:name menoy:price number:number select:status     **/
	this.tbjiOrderDetails=function(tbjiOrderDetails){if(this.proxy)return this.getProxy().tbjiOrderDetails(tbjiOrderDetails);  this.put("tbjiOrderDetails", tbjiOrderDetails);return this;};
	/** and tbji_order_details is null */
	this.tbjiOrderDetailsNull=function(){if(this.proxy)return this.getProxy().tbjiOrderDetailsNull();if(this.get("tbjiOrderDetailsNot")==null)this.put("tbjiOrderDetailsNot", "");this.put("tbjiOrderDetails", null);return this;};
	/** not .... */
	this.tbjiOrderDetailsNot=function(){if(this.proxy)return this.getProxy().tbjiOrderDetailsNot();this.put("tbjiOrderDetailsNot", "not");return this;};
	this.tbjiOrderDetailsNotNull=function(){if(this.proxy)return this.getProxy().tbjiOrderDetailsNotNull();this.put("tbjiOrderDetailsNot", "not");this.put("tbjiOrderDetails", null);return this;};
	this.tbjiOrderDetailsNot=function(tbjiOrderDetails){if(this.proxy)return this.getProxy().tbjiOrderDetailsNot(tbjiOrderDetails);this.put("tbjiOrderDetailsNot", "not");this.put("tbjiOrderDetails", tbjiOrderDetails);return this;};
	
	/** 收益金额 [非空]       **/
	this.tbjiMoney=function(tbjiMoney){if(this.proxy)return this.getProxy().tbjiMoney(tbjiMoney);  this.put("tbjiMoney", tbjiMoney);return this;};
	/** and tbji_money is null */
	this.tbjiMoneyNull=function(){if(this.proxy)return this.getProxy().tbjiMoneyNull();if(this.get("tbjiMoneyNot")==null)this.put("tbjiMoneyNot", "");this.put("tbjiMoney", null);return this;};
	/** not .... */
	this.tbjiMoneyNot=function(){if(this.proxy)return this.getProxy().tbjiMoneyNot();this.put("tbjiMoneyNot", "not");return this;};
	this.tbjiMoneyNotNull=function(){if(this.proxy)return this.getProxy().tbjiMoneyNotNull();this.put("tbjiMoneyNot", "not");this.put("tbjiMoney", null);return this;};
	this.tbjiMoneyNot=function(tbjiMoney){if(this.proxy)return this.getProxy().tbjiMoneyNot(tbjiMoney);this.put("tbjiMoneyNot", "not");this.put("tbjiMoney", tbjiMoney);return this;};
	/** and tbji_money <= ? */
	this.tbjiMoneyMin=function(min){if(this.proxy)return this.getProxy().tbjiMoneyMin(min);this.put("tbjiMoneyMin", min);return this;};
	/** and tbji_money >= ? */
	this.tbjiMoneyMax=function(max){if(this.proxy)return this.getProxy().tbjiMoneyMax(max);this.put("tbjiMoneyMax", max);return this;};
	
	/** 获得时间 [非空]       **/
	this.tbjiTime=function(tbjiTime){if(this.proxy)return this.getProxy().tbjiTime(tbjiTime);  this.put("tbjiTime", tbjiTime);return this;};
	/** and tbji_time is null */
	this.tbjiTimeNull=function(){if(this.proxy)return this.getProxy().tbjiTimeNull();if(this.get("tbjiTimeNot")==null)this.put("tbjiTimeNot", "");this.put("tbjiTime", null);return this;};
	/** not .... */
	this.tbjiTimeNot=function(){if(this.proxy)return this.getProxy().tbjiTimeNot();this.put("tbjiTimeNot", "not");return this;};
	this.tbjiTimeNotNull=function(){if(this.proxy)return this.getProxy().tbjiTimeNotNull();this.put("tbjiTimeNot", "not");this.put("tbjiTime", null);return this;};
	this.tbjiTimeNot=function(tbjiTime){if(this.proxy)return this.getProxy().tbjiTimeNot(tbjiTime);this.put("tbjiTimeNot", "not");this.put("tbjiTime", tbjiTime);return this;};
	/** and tbji_time >= ? */
	this.tbjiTimeStart=function(start){if(this.proxy)return this.getProxy().tbjiTimeStart(start);this.put("tbjiTimeStart", start);return this;};			
	/** and tbji_time <= ? */
	this.tbjiTimeEnd=function(end){if(this.proxy)return this.getProxy().tbjiTimeEnd(end);this.put("tbjiTimeEnd", end);return this;};
	
	
	
	this.add=function(key,value) {if(proxy)return proxy().add(key,value);this.put(key, value);return this;}
	this.desc=function(sql) {if(proxy)return proxy().desc(sql);this.put("desc", sql);return this;}
	this.asc=function(sql) {if(proxy)return proxy().asc(sql);this.put("asc", sql);return this;}
	this.definex=function(sql) {if(proxy)return proxy().definex(sql);this.put("definex", sql);return this;}
	
	/** 获取所有经销商收益 **/
	this.list=function(size){
		this.data.size = size;
		var protocol = ux.ajax("/admin/finance/jxshincome.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list)return protocol.data.list;
		return [];
	}
	/** 获取经销商收益分页 **/
	this.page=function(page,size){
		this.data.size = size;
		this.data.page = page;
		var protocol = ux.ajax("/admin/finance/jxshincome.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data)return data;
		return {list:[]};
	}
	/** 根据查询条件取经销商收益 **/
	this.get=function(){
		this.data.size = 1;
		var protocol = ux.ajax("/admin/finance/jxshincome.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list && protocol.data.list.length==1)return protocol.data.list[0]; 
		return null;
	}
}

TbJxshIncome.get = function(id){
	var protocol = ux.ajax("/admin/finance/jxshincome.get.do",{id:id});
	if(!protocol)return null;
	if(protocol.data)return protocol.data.tbJxshIncome;
	return null;
}

TbJxshIncome.where = new TbJxshIncome.Where(0,true);